<?php

namespace module\manage\validate;

use app\Validate;
use app\model\UserVoucher as Model;

/**
 * 用户 验证
 *
 * @author suiyuan
 */
class UserVoucher extends Validate
{
    /**
     * 所有验证场景需要验证的字段.
     *
     * @var array<array>
     */
    protected $scene = [
        'index' => ['way', 'page', 'pageSize'],
    ];
    protected $rule =   [
        'way' => 'require|integer', // 途径
        'page' => 'integer|>:0',
        'pageSize' => 'integer|>:0',
    ];
    
    /**
     * 验证字段
     *
     * @var array
     */
    protected $field = [
        'way' => '途径', // 目标
        'page' => '页码',
        'pageSize' => '分页大小',
    ];
}
